[java - xml] Get DTD from an XML file

Posted by itit on Stack Overflow See other posts from Stack Overflow or by itit
Published on 2010-06-01T14:40:49Z Indexed on 2010/06/01 14:43 UTC
Read the original article Hit count: 384

Filed under:
|

How can I get in Java the DTD file name specified in an xml file?

So, if I have:

<!DOCTYPE TEI SYSTEM "dtd-file.dtd"  [
[
<!ENTITY c24r SYSTEM "c2r.jpg" NDATA JPEG>
<!NOTATION JPEG SYSTEM "image/jpeg">
<!ELEMENT figure EMPTY>
<!ATTLIST figure entity CDATA #REQUIRED>
]>

I want the string "dtd-file.dtd"

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml